﻿using System;
using System.Collections.Generic;
using ShopB2C.Entity;

namespace ShopB2C.ViewModels {
    /// <summary>
    /// 图片轮换
    /// </summary>
    [Serializable]
    public class ImageRepeatViewModel {
        /// <summary>
        /// 配置图片宽
        /// </summary>
        public int Width { get; set; }
        /// <summary>
        /// 配置图片高
        /// </summary>
        public int Height { get; set; }
        /// <summary>
        /// 配置图片轮换间隔(秒)
        /// </summary>
        public int Interval { get; set; }
        /// <summary>
        /// 配置图片是否自动轮换
        /// </summary>
        public string IsAutoPlay { get; set; }
        /// <summary>
        /// 配置图片是否显示简单说明
        /// </summary>
        public string IsShowContent { get; set; }
        /// <summary>
        /// 配置图片是否显示图片切换链接
        /// </summary>
        public string IsShowImgPage { get; set; }
        /// <summary>
        /// 图片轮换图片
        /// </summary>
        public ImageRepeatEntity ImageRepeat { get; set; }
        /// <summary>
        /// 图片轮换图片集合
        /// </summary>
        public List<ImageRepeatEntity> ImageRepeatList { get; set; }
        /// <summary>
        /// 下拉列表项
        /// </summary>
        public List<object> Options {
            get {
                return new List<object>(2) {
                    new { Text = "- 是 -", Value = "true" },
                    new { Text = "- 否 -", Value = "false" }
                };
            }
        }
    }
    /// <summary>
    /// 搜索
    /// </summary>
    [Serializable]
    public class SearchViewModel {
        /// <summary>
        /// 热门搜索关键字
        /// </summary>
        public string HotKeys { get; set; }
        /// <summary>
        /// 搜索缺省的关键字
        /// </summary>
        public string DefaultKey { get; set; }
        /// <summary>
        /// 分页实体
        /// </summary>
        public object Pager { get; set; }
        /// <summary>
        /// 分页
        /// </summary>
        public int PageNumber { get; set; }
        /// <summary>
        /// 搜索关键字
        /// </summary>
        public ProductSearchKeysEntity ProductSearchKeys { get; set; }
        /// <summary>
        /// 搜索关键字集
        /// </summary>
        public List<ProductSearchKeysEntity> ProductSearchKeysList { get; set; }
    }
    /// <summary>
    /// 新闻配置
    /// </summary>
    [Serializable]
    public class NewsConfigViewModel {
        /// <summary>
        /// 首页显示的新闻模块名称
        /// </summary>
        public string Title { get; set; }
        /// <summary>
        /// 显示指定分类下的新闻
        /// </summary>
        public int ClassifyId { get; set; }
        /// <summary>
        /// 新闻分类集合
        /// </summary>
        public List<ClassifyEntity> ClassifyList { get; set; }
        /// <summary>
        /// 显示指定条数的新闻
        /// </summary>
        public int ShowNums { get; set; }
    }
}
